/*package com.guage.es;

import java.net.InetAddress;
import java.net.UnknownHostException;

import org.elasticsearch.action.get.GetResponse;
import org.elasticsearch.client.transport.TransportClient;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.transport.InetSocketTransportAddress;
import org.elasticsearch.xpack.client.PreBuiltXPackTransportClient;

public class App {
    public static void main(String[] args) {
        // on startup
        TransportClient client;
        try {
            Settings settings = Settings.builder()
                    .put("cluster.name", "elasticsearch")
                    .put("client.transport.sniff", true).build();
            client = new PreBuiltXPackTransportClient(settings)
                    .addTransportAddress(
                            new InetSocketTransportAddress(InetAddress
                                    .getByName("192.168.222.129"), 9300))
                    .addTransportAddress(
                            new InetSocketTransportAddress(InetAddress
                                    .getByName("192.168.222.130"), 9300))
                    .addTransportAddress(
                            new InetSocketTransportAddress(InetAddress
                                    .getByName("192.168.222.131"), 9300));
            GetResponse response = client.prepareGet("book", "novel", "2")
                    .setOperationThreaded(true).get();
            System.out.println(response);

            // on shutdown
            client.close();
        } catch (UnknownHostException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }

    }
}*/